<?php if(!IS_AJAX){?>

<include file="Public:header" />
<div class="row">
  <div class="col-sm-12">
    <section class="panel">
      <div class="panel-body">
        <table class="table-bordered table" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>

    <td align="center">订单号</td>
    <td align="center">用户名</td>
    <td align="center">快递号</td>
    <td align="center">快递公司</td>
    <td align="center">退/换货数量</td>
    <td align="center">退货金额</td>
    <td align="center">退货类型</td>
    <td align="center">状态</td>
    <td align="center">申请日期</td>
    <td align="center">操作</td>
  </tr>
</thead>
          <tbody class="ajaxdatalist" id="ajaxdatalist">
            <?php }?>
            
            
            
            <?php if(IS_AJAX){?>
            <!-- 数据主体 -->
        <notempty name="list">    
            


 <volist name="list" id="vo">
  <tr class="data_list">
    
    <td align="center"><a href="{:U('returngoods_mes',array('id'=>$vo['sale_id']))}" target="center">{$vo.ordernumber}</a></td>
    <td align="center">{$vo.yourname}</td>
    <td align="center">{$vo.couriernumber}</td>
    <td align="center">{$vo.courier}</td>
    <td align="center">{$vo.thnum}</td>
    <td align="center">
    <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
    ￥{$vo['price']*$vo['thnum']}
    </if>
    </td>
    <td align="center"><if condition="$vo.thtype eq 1">退货<elseif condition="$vo.thtype eq 2"/>换货<elseif condition="$vo.thtype eq 3"/>退款</if></td>
    <td align="center">
    
    <eq name="vo.thtype" value="3">
    <if condition="$vo.thstatus eq 3">待审核<elseif condition="$vo.thstatus eq 4"/>已完成</if>
    
    <else/>
    <if condition="$vo.thstatus eq 1">待审核<elseif condition="$vo.thstatus eq 2"/>已审核，等待用户提交物流<elseif condition="$vo.thstatus eq 3"/>用户已经提交物流信息，待退货<elseif condition="$vo.thstatus eq 4"/>已完成<elseif condition="$vo.thstatus eq 5"/>管理员已退货，正等待用户收货</if>
    </eq>
    
    </td> 
    <td align="center">{:date('Y-m-d H:i:s', $vo['create_time'])}</td>
    <td align="center">
    
        <a onClick="art.dialog.open('{:U('returngoods_mes',array('id'=>$vo['sale_id'],'product_id'=>$vo['product_id']))}', {width: 800, height: 500,lock:true,title:'售后详情'});" href="##">查看</a> 
       | 
      <if condition="$vo.thstatus eq 1">
     
      <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
      <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">退货审核</a>
      <elseif condition="$vo.thtype eq 2"/>
      <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">换货审核</a>
      </if>
      
      
      <elseif condition="$vo.thstatus eq 3"/>
       
       <if condition="$vo.thtype eq 1 || $vo.thtype eq 3">
        <a data-toggle="modal" data-target="#myModal" onClick="document.getElementById('sale_id').value={$vo.sale_id}" href="##">确认</a>
       <elseif condition="$vo.thtype eq 2"/> 
        <a data-toggle="modal" data-target="#myModal1" onClick="document.getElementById('sale_id1').value={$vo.sale_id}" href="##">换货确认</a>
       </if>
       |
       
      </if>
      <a data-toggle="modal" data-target="#myModal11" onClick="document.getElementById('sale_id11').value={$vo.sale_id}" href="##">取消</a>
      
      </td>
  </tr>
</volist>
<else/>
<tr>
<td colspan="10" align="center">暂无信息</td>
</tr>
</notempty>


            <?php }?>
            <!-- 数据主体结束 -->
            
            <?php if(!IS_AJAX){?>
          </tbody>
        </table>
        <div id="ajaxdatalistpages"></div>
      </div>
    </section>
  </div>
  
</div>
<form id="ajaxdatalistform">
          
          
        </form>
<include file="Public:footer" />
<style>
    .option a.btn{margin-top:5px;}
</style>


    <div class="modal fade" id="myModal11" tabindex="-1" role="dialog" aria-labelledby="myModalLabel11"><form action="{:U('upstate')}" method="post">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">取消售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">操作备注</label>
            <br>
            <input type="hidden" value="" id="sale_id11" name="sale_id">
            <input type="hidden" value="0" id="" name="thstatus">
            
            <input type="text" class="form-control" id="remark" name="remark" placeholder="请填写操作备注，以便以后查证">
            
            
            
            
            
            
            
            
            
            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div></form> 
    </div>













    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><form action="{:U('upstate')}" method="post">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">操作备注</label>
            <br>
            <input type="hidden" value="" id="sale_id" name="sale_id">
            
            
            <input type="text" class="form-control" id="remark" name="remark" placeholder="请填写操作备注，以便以后查证">
            
            
            
            
            
            
            
            
            
            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div></form> 
    </div>



    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><form action="{:U('upstate')}" method="post">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">售后管理</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2">快递单号</label>
            <br>
            <input type="hidden" value="" id="sale_id1" name="sale_id">
            
            
            <input class="form-control" datatype="n" value="" name="couriernumber" id="couriernumber" type="text" placeholder="请输入退货快递单号">
            <br>

            <label for="exampleInputName2">快递公司</label>
            <br>
           
            
            
            <input class="form-control" datatype="n" value="" name="courier" id="courier" type="text" placeholder="请填写快递公司"> 
            
            
            
            
            
            
            
            
            
            
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div></form> 
    </div>

</body></html><?php }?>

